<?php
$di = \Phalcon\Di::getDefault();
$options = ['null'=>'不加入书本'];
$nodeList = $di->getShared('entityManager')->find('node', [
    'conditions' => [
        'contentModel' => 'book'
    ]
]);
foreach ($nodeList as $node) {
    $options[strval($node->getId())] = $node->getTitle();
}
return array(
    'field' => 'group',
    'widget' => 'Group',
    'label' => '编入书本',
    'description' => '',
    'error' => '',
    'attributes' => array(),
    'access' => array(
        'path' => array(
            '/admin/.*',
            '/.*?/admin/.*'
        )
    ),
    'right' => true,
    'group' => array(
        'book_id' => array(
            'widget' => 'Select',
            'options' => $options,
            'access' => array(
                'addForm' => false,
                'editForm' => false,
            ),
            'required' => false,
            'description' => '添加该文章到此书本目录',
            'error' => '',
            'label' => '书本',
            'attributes' => array(
                'class' => 'form-control',
            ),
        ),
    ),
);